package com.example.arithmeticleetcode.learnArithmetic2.bloom;

/**
 * @program: arithmetic-leetcode
 * @description:
 * @author: FangZhen
 * @create: 2020-12-31 15:20
 **/
public class Main {

    public static void main(String[] args) {
        BloomFilter<Object> bloomFilter = new BloomFilter<>(1_00_0000, 0.01);
        for (int i = 1; i <= 1_00_0000; i++) {
            bloomFilter.put(i);
        }
        int count = 0;
        for (int i = 1_00_0000; i <= 2_00_0000; i++) {
            if (bloomFilter.contains(i)) {
                count++;
            }
        }
        System.out.println(count);


        System.out.println("------------------");
        int i = 4;
        int backI = ~i;
        System.out.println(i + "  =  " + backI);
    }
}
